package com.holly.unit.bpmn.designer.exception.enums;

import com.holly.unit.bpmn.designer.constants.BpmnDesignerConstants;
import com.holly.unit.core.constants.RuleConstants;
import com.holly.unit.core.exception.AbstractExceptionEnum;
import lombok.Getter;

/**
 * 类描述: 流程设计器异常枚举类
 *
 * @author fxr
 * @version 1.0.0
 * @date 2022/5/7 10:18
 */
@Getter
public enum BpmnDesignerExceptionEnum implements AbstractExceptionEnum {

    /**
     * 获取token失败
     */
    TOKEN_GET_ERROR(RuleConstants.USER_OPERATION_ERROR_TYPE_CODE + BpmnDesignerConstants.EXCEPTION_STEP_CODE + "01", "获取token失败，请检查header和param中是否传递了用户token"),

    /**
     * 流程文档校验
     */
    BPMN_MODEL_VALIDATE_ERROR(RuleConstants.USER_OPERATION_ERROR_TYPE_CODE + BpmnDesignerConstants.EXCEPTION_STEP_CODE + "02", "流程文档校验失败，请检查流程文档");


    /**
     * 错误编码
     */
    private final String errorCode;

    /**
     * 提示用户信息
     */
    private final String userTip;

    BpmnDesignerExceptionEnum(String errorCode, String userTip) {
        this.errorCode = errorCode;
        this.userTip = userTip;
    }

}
